package top.bfylu.singleton.classic;

/**
 * 包名: top.bfylu.singleton.classic
 * 创建时间: 2022/1/29
 *
 * @author bfy
 * @version 1.0.0
 * <p>
 * 描述:
 * @Email bfyjian@gmail.com
 **/
public class Singleton {
    private static Singleton uniqueInstance;

    //其他有用的实例化的变量
    private Singleton() {}

    public static synchronized Singleton getInstance() {
        if (uniqueInstance == null) {
            uniqueInstance = new Singleton();
        }
        return uniqueInstance;
    }

    //其他有用的方法
}
